package java02;

public class java01_1 {
    public static void main(String[] args) {
            int a=999;
            int x=a/100;
            int y=a%100/10;
            int z=a%100%10;
            int c=x+y+z;
            System.out.println("输入的三位数为:"+a);
            System.out.println("百位数:"+x);
            System.out.println("十位数:"+y);
            System.out.println("个位数:"+z);
            System.out.println("和为:"+c);

    }
}
